{
  "type": "record",
  "name": "TransactionEvent",
  "namespace": "org.jmresler.sakila.movies.model",
  "doc": "Film event",
  "fields": [
    {
      "name": "header",
      "type": [
        "null",
        {
          "type": "record",
          "name": "FilmEventHeader",
          "doc": "Default information",
          "fields": [
            {
              "name": "id",
              "type": {
                "type": "string",
                "avro.java.string": "String"
              },
              "doc": "GUID (UUID) of the film event making it globally identifiable"
            },
            {
              "name": "sourceSystem",
              "type": {
                "type": "string",
                "avro.java.string": "String"
              },
              "doc": "Source system which created the film event"
            },
            {
              "name": "createdAt",
              "type": "long",
              "doc": "Event timestamp creation in epoch format"
            }
          ]
        }
      ],
      "default": null
    },
    {
      "name": "body",
      "type": {
        "type": "record",
        "name": "FilmEventBody",
        "doc": "Body information of the film event",
        "fields": [
          {
            "name": "filmEventId",
            "type": {
              "type": "string",
              "avro.java.string": "String"
            },
            "doc": "UUID of the transaction"
          },
          {
            "name": "userId",
            "type": {
              "type": "string",
              "avro.java.string": "String"
            },
            "doc": "UUID of the user that initiated the transaction"
          },
          {
            "name": "actors",
            "type": {
              "type": "string",
              "avro.java.string": "String"
            },
            "doc": "Actors in the film"
          },
          {
            "name": "transactionType",
            "type": {
              "type": "enum",
              "name": "TransactionType",
              "symbols": [
                "INSTANT_PAYMENT",
                "SEPA",
                "CREDIT_CARD"
              ]
            },
            "doc": "Transaction type. Future values might be added"
          },
          {
            "name": "date",
            "type": "long",
            "doc": "The timestamp when the transaction event was generated"
          },
          {
            "name": "amount",
            "type": "long",
            "doc": "The value of the transaction"
          },
          {
            "name": "currency",
            "type": [
              "null",
              {
                "type": "string",
                "avro.java.string": "String"
              }
            ],
            "doc": "Transaction currency",
            "default": null
          },
          {
            "name": "description",
            "type": [
              "null",
              {
                "type": "string",
                "avro.java.string": "String"
              }
            ],
            "doc": "Description of the transaction purpose",
            "default": null
          }
        ]
      },
      "doc": "body of transaction event"
    }
  ]
}